package com.woniu.common.entity;


import lombok.Getter;

@Getter
public enum ResultCode {

    /* 成功状态码 */
    SUCCESS(20000, "成功"),
    ERROR(40000, "失败"),

    /* 相亲返回参数状态码 */
    DATING_SUCCESS(20050, "成功"),
    DATING_ERROR(40050, "失败"),
    DATING_CREATE(30000, "信息已创建"),
    DATING_GAME_NULL(20051,"您已查看完所有匹配对象"),
    DATING_INFO_EXIST(20060,"请您支付2比特币购买该信息"),
    DATING_BITCOIN_INSUFFICIENT(20070,"您的比特币余额不足"),
    DATING_CONCERN_EXISTED(20080,"您不可重复关注"),
    DATING_CONCERN_DELETE(20080,"您已成功取消，请刷新列表"),

    /* 参数错误：10001-19999 */
    PARAM_IS_INVALID(10001, "参数无效"),
    PARAM_IS_BLANK(10002, "参数为空"),
    PARAM_TYPE_BIND_ERROR(10003, "参数类型错误"),
    PARAM_NOT_COMPLETE(10004, "参数缺失"),
    /* 用户错误：20001-29999*/
    USER_NOT_LOGGED_IN(20001, "用户未登录"),
    USER_LOGIN_ERROR(20002, "账号不存在或密码错误"),
    USER_ACCOUNT_FORBIDDEN(20003, "账号已被禁用"),
    USER_NOT_EXIST(20004, "用户不存在"),
    USER_HAS_EXISTED(20005, "用户已存在"),
    CODE_ERROR(20006, "验证码错误"),
    TOKEN_ERROR(20007, "无效令牌"),
    USER_COMMENT_STATUS(20008, "评论已被禁用"),
    USER_COMMENT_STATUS_OPEN(20009, "该帖子没开启评论"),
    USER_TYPE_ERROR(20010, "用户类型错误"),
    USER_COMPLAINT_ERROR(20011, "未审核"),
    USER_LIKE_STATUS_ERROR(20012, "没有点赞信息"),
    USER_LIKE_RECORD(20013, "不存在点赞记录"),
    USER_LIKE_INSERT(20014, "新增点赞数据失败"),
    USER_LIKE_LOAD(20015, "更新点赞数据失败"),
    /* 业务错误：30001-39999 */
    SPECIFIED_QUESTIONED_USER_NOT_EXIST(30001, "某业务出现问题"),
    /* 系统错误：40001-49999 */
    SYSTEM_INNER_ERROR(40001, "系统繁忙，请稍后重试"),
    /* 数据错误：50001-599999 */
    RESULT_DATA_NONE(50001, "数据未找到"),
    DATA_IS_WRONG(50002, "数据有误"),
    DATA_ALREADY_EXISTED(50003, "数据已存在"),
    MESSAGE_TYPE_NOT_EXIST(50004, "消息类型不存在"),
    /* 接口错误：60001-69999 */
    INTERFACE_INNER_INVOKE_ERROR(60001, "内部系统接口调用异常"),
    INTERFACE_OUTTER_INVOKE_ERROR(60002, "外部系统接口调用异常"),
    INTERFACE_FORBID_VISIT(60003, "该接口禁止访问"),
    INTERFACE_ADDRESS_INVALID(60004, "接口地址无效"),
    INTERFACE_REQUEST_TIMEOUT(60005, "接口请求超时"),
    INTERFACE_EXCEED_LOAD(60006, "接口负载过高"),
    /* 权限错误：70001-79999 */
    PERMISSION_NO_ACCESS(70001, "无访问权限"),
    /* 权限错误：80001-80006 */
    PRODUCT_NOT_EXIST(80001, "商品不存在"),
    PRODUCT_NOT_PUBLISH(80002, "商品已下架"),
    PRODUCT_NO_STOCK(80003, "商品库存不足"),
    PRODUCT_NOT_DELETE(80004, "商品已被删除"),
    PRODUCT_NOT_VERIFY(80005, "该商品审核没通过"),
    REPEAT_REQUEST(80006, "请勿重复下单"),
    NON_REFUNDABLE(80007, "不符合退款条件");
    private Integer code;
    private String message;

    ResultCode(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
